// custom-tab-bar/index.ts
Component({
  data: {
    numberList: [0, 0],
    selected: 0,
    color: '#656563',
    selectedColor: '#69D013',
    backgroundColor: '#FFFFFF',
    borderStyle: 'white',
    "list": [{
        "pagePath": "/pages/index/index",
        "iconPath": "/resources/images/tabbar/index_unSelected.png",
        "selectedIconPath": "/resources/images/tabbar/index_selected.png",
        "text": "Index"
      },
      {
        "pagePath": "/pages/my/my",
        "iconPath": "/resources/images/tabbar/my_unSelected.png",
        "selectedIconPath": "/resources/images/tabbar/my_selected.png",
        "text": "My"
      }
    ]
  },
  /**
   * 组件的方法列表
   */
  methods: {
    switchTab(e:any) {
      const data = e.currentTarget.dataset;
      const url = data.path;
      wx.switchTab({url});
    }
  }
})